home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_12
/
8n12121a
< prev
next >
Wrap
Text File
|
1990-10-29
|
829b
|
43 lines
/**** LISTING 1 *******/
/* States */
#define S_OFF 1
#define S_POWER 2
#define S_READY 3
#define S_PLAY 4
#define S_FAST_F 5
#define S_REWIND 6
#define S_RECORD 7
/* Events */
#define E_POWER 1
#define E_CHAN_UP 2
#define E_CHAN_DOWN 3
#define E_TAPE_IN 4
#define E_TAPE_EJECT 5
#define E_STOP 6
#define E_PLAY 7
#define E_RECORD 8
#define E_FAST_F 9
#define E_REWIND 10
#define E_TIMEOUT 11
/* Miscellaneous */
#define END -1
#define MAX_CHAN 13
/* Argument Structure */
typedef struct {
int cur_state;
int chan;
} ARG;
/* State Table Structure */
typedef struct {
int state;
int event;
int n_state;
int (*flist[5]) ();
} S_TABLE;